/*
 * Copyright © 2017 eqxiu.com 北京中网易企秀科技有限公司  All rights reserved.
 */

package cn.hermit.nio.http.server.rest.bookstore;

import cn.hermit.nio.http.server.rest.annotation.Resource;
import cn.hermit.nio.http.server.rest.annotation.Response;
import cn.hermit.nio.http.server.rest.annotation.Tag;
import cn.hermit.nio.http.Http;
import cn.hermit.nio.http.server.rest.annotation.Operation;

import java.util.Arrays;
import java.util.List;

/**
 * @author JackGao 高建国
 * @description //TODO 设计说明
 * @date 30/5/2017
 */
@Resource(tags=@Tag(name="BookStore", description = "BookStore Resource"), path = "/bookstore")
public class BookStoreResource {

    @Operation(path="/findBooks", name= Http.Verb.GET,
    description = "Find all Books",
            responses = {
            @Response(schema = "[Book]")
            }
    )
    public List<Book> findBooks() {
        List<Book> books = Arrays.asList(
                new Book("Book0","Author0","Description0"),
                new Book("Book1","Author1","Description1"),
                new Book("Book2","Author2","Description2"),
                new Book("Book3","Author3","Description3"),
                new Book("Book4","Author4","Description4")
        );
        return books;
    }

}
